<template>
  
    <el-main>
    <p class="title">首页</p>
    <el-row :gutter="30">
      <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="big">
        <div class="grid-content bg-purple" style="background:#F0B45F">
            <p>{{List.userCount}}</p>
            <p><i class="el-icon-user"></i>用户总数</p>
        </div>
      </el-col>

      <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="big">
        <div class="grid-content bg-purple-light" style="background:#6BBE6B">
            <p>{{List.productCount}}</p>
            <p><i class="el-icon-s-fold"></i>商品总数</p>
        </div>
      </el-col>

      <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="big">
        <div class="grid-content bg-purple" style="background:#5DB8D3">
            <p>{{List.orderCount}}</p>
            <p><i class="el-icon-circle-check"></i>订单总数</p>
        </div>
      </el-col>
    </el-row>
  </el-main>
</template>

<script>
import { shou } from "@/request/http";
export default {
  data() {
    return {
      List: ""
    };
  },
  mounted() {
    this.getList();
  },
  methods: {
    getList() {
      shou().then(res => {
        console.log(res.data.data);
        this.List = res.data.data;
      });
    }
  }
};
</script>

<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
}
@import "@/Scss/index.scss";
.el-main {
  background: #f3f3f3;
  padding: 30px;
  box-sizing: border-box;
}
.title {
  @include FontOnly(35px);
  margin-bottom: 30px;
}
.el-col {
  border-radius: 4px;
  // margin-left: 10px;
}
.bg-purple-dark {
  background: #99a9bf;
}
.bg-purple {
  background: #d3dce6;
}
.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
  padding:40px 0;
  text-align: center;
  >p:first-of-type{
      @include FontSize(40px);
      color:white;
  }
  >p:last-of-type{
      @include FontOnly(20px);
      @include Mlt(0,20px);
      color:white;
  }
}
.big{
    transition: all 0.5s;
}
.big:hover {
  opacity: 1;
  transform: scale(1.1);
  -webkit-transform: scale(1.1);
  -moz-transform: scale(1.1);
  -o-transform: scale(1.1);
  -ms-transform: scale(1.1);
  div>p{
    color:black;
  }
}

</style>